<template>
  <div class="home">
    <!-- 筛选 -->
    <div class="search_content">
      <van-nav-bar
        :title="$route.meta.title"
        left-text="返回"
        left-arrow
        @click-left="$router.go(-1)"
      />
      <van-search
        v-model="requestParams.codeNo"
        placeholder="请输入车架号或者车牌号"
        shape="round"
        @search="initData"
        @clear="clearSearch"
      />
      <div class="search_item">
        <van-dropdown-menu :close-on-click-outside="false">
          <van-dropdown-item title="日期" ref="statusRef">
            <div class="searchbox">
              <div class="title">签约日期</div>
              <div class="flex">
                <van-field
                  class="time_item"
                  v-model="requestParams.bizStartDate"
                  label
                  :placeholder="'开始时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('bizStartDate')"
                />
                -
                <van-field
                  class="time_item"
                  v-model="requestParams.bizEndDate"
                  label
                  :placeholder="'结束时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('bizEndDate')"
                />
              </div>

              <div class="title">整车开票日期</div>
              <div class="flex">
                <van-field
                  class="time_item"
                  v-model="requestParams.invoiceStartDate"
                  label
                  :placeholder="'开始时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('invoiceStartDate')"
                />
                -
                <van-field
                  class="time_item"
                  v-model="requestParams.invoiceEndDate"
                  label
                  :placeholder="'结束时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('invoiceEndDate')"
                />
              </div>

              <div class="title">最后收款日期</div>
              <div class="flex">
                <van-field
                  class="time_item"
                  v-model="requestParams.receiveStartDate"
                  label
                  :placeholder="'开始时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('receiveStartDate')"
                />
                -
                <van-field
                  class="time_item"
                  v-model="requestParams.receiveEndDate"
                  label
                  :placeholder="'结束时间'"
                  input-align="right"
                  readonly
                  @click="handleSelectTime('receiveEndDate')"
                />
              </div>

              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleSearchReset()"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('statusRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>

          <van-dropdown-item title="销售类型" ref="salesTypeRef">
            <div class="searchbox">
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="item.check ? 'active' : ''"
                  v-for="(item, index) in sellTypeList"
                  :key="index"
                  @click="handleSearchSelect(index, 'sellTypeList')"
                >
                  {{ item.name }}
                </div>
              </div>
              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleSearchReset()"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('salesTypeRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>

          <van-dropdown-item title="筛选" ref="filterRef">
            <div class="searchbox timebox">
              <div class="title">是否收全款</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="index == delayIndex ? 'active' : ''"
                  v-for="(item, index) in delayList"
                  :key="index"
                  @click="
                    handleIsSelect(
                      index,
                      'delayIndex',
                      'delayList',
                      'isReceive'
                    )
                  "
                >
                  {{ item.name }}
                </div>
              </div>
              <div class="title">是否开全票</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="index == creatIndex ? 'active' : ''"
                  v-for="(item, index) in creatList"
                  :key="index"
                  @click="
                    handleIsSelect(
                      index,
                      'creatIndex',
                      'creatList',
                      'isInvoice'
                    )
                  "
                >
                  {{ item.name }}
                </div>
              </div>
              <div class="title">是否销售精品</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="index == defeatIndex ? 'active' : ''"
                  v-for="(item, index) in defeatList"
                  :key="index"
                  @click="
                    handleIsSelect(
                      index,
                      'defeatIndex',
                      'defeatList',
                      'isSaleJP'
                    )
                  "
                >
                  {{ item.name }}
                </div>
              </div>
              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleAccidentReset()"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('filterRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>
        </van-dropdown-menu>

        <!-- 服务顾问下拉 -->
        <van-popup v-model="showSelectPicker" position="bottom">
          <van-picker
            show-toolbar
            :columns="columns"
            @confirm="handleSelectConfirm"
            @cancel="showSelectPicker = false"
            value-key="name"
          />
        </van-popup>
        <!-- 时间选择 -->
        <van-popup v-model="showPickerDate" position="bottom">
          <van-datetime-picker
            v-model="currentDate"
            type="date"
            @cancel="onCancelDate"
            @confirm="onConfirmDate"
            :formatter="formatter"
          />
        </van-popup>
      </div>
    </div>

    <!-- 列表 -->
    <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
      <van-list
        v-model="loading"
        :finished="finished"
        finished-text="没有更多了"
        @load="loadData"
        v-if="recordList && recordList.length != 0"
      >
        <div class="carList">
          <div
            class="carItem"
            v-for="(item, index) in recordList"
            :key="index"
            @click="goDetail(item)"
          >
            <div class="carItem_name">
              {{ item.carModel ? item.carModel : "-" }}
            </div>
            <div class="carItem_con">
              <div class="carItem_con_lt">
                <img
                  v-if="item.imageCol && item.imageCol[0]"
                  :src="item.imageCol[0].imageUrl"
                />
                <div v-else class="noimg">暂无图片</div>
              </div>
              <div class="carItem_con_rt">
                <div class="carItem_data">
                  <div class="carItem_data_txt" v-if="item.carNo">
                    {{ item.carNo ? item.carNo : "-" }}
                  </div>
                  <div class="carItem_data_txt" v-if="item.firstDate">
                    {{ item.firstDate ? item.firstDate : "-" }}上牌
                  </div>
                </div>
                <div class="carItem_data">
                  <div class="carItem_label">车架号：</div>
                  <div class="carItem_txt">
                    {{ item.vinCode ? item.vinCode : "-" }}
                  </div>
                </div>
                <div class="carItem_data">
                  <div class="carItem_label">签约日期：</div>
                  <div class="carItem_txt">
                    {{ item.bizDate ? item.bizDate : "-" }}
                  </div>
                </div>
                <div class="carItem_data">
                  <div class="carItem_label">销售展厅：</div>
                  <div class="carItem_txt">
                    {{ item.showOrgName ? item.showOrgName : "-" }}
                  </div>
                </div>
                <div class="carItem_data">
                  <div class="carItem_label">销售顾问：</div>
                  <div class="carItem_txt">
                    {{ item.salePerson ? item.salePerson : "-" }}
                  </div>
                </div>
                <div class="carItem_data">
                  <div class="carItem_label">销售类型：</div>
                  <div class="carItem_txt">
                    {{ item.saleType ? item.saleType : "-" }}
                  </div>
                </div>
              </div>
            </div>
            <div class="carItem_footer">
              <div class="carStatus" v-if="item.isReceive == 1">收全款</div>
              <div class="carStatus" v-if="item.isInvoice == 1">开全票</div>
              <div class="carStatus">{{ item.billStatus }}</div>
            </div>
          </div>
        </div>
        <!-- <div class="orderList">
          <div class="flex" v-for="(item, index) in recordList" :key="index">
            <div class="orderItem">
              <div class="orderItem_header">
                <div class="orderItem_lt" @click="goDetail(item)">
                  <div class="carNo">{{ item.carModel }}</div>
                </div>
              </div>
              <div class="orderItem_content" @click="goDetail(item)">
                <div class="orderItem_data time">
                  <div class="txt">
                    {{ item.carNo ? item.carNo + '|' : '' }}
                    {{ item.saleType ? item.saleType + '' : '' }}
                    {{ item.carMiles ? '| ' + item.carMiles + '万公里' : '' }}
                  </div>
                </div>
                <div class="orderItem_data time">
                  <div class="order_label">车架号</div>
                  <div class="txt">{{ item.vinCode }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">展厅</div>
                  <div class="txt">{{ item.showOrgName }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">销售顾问</div>
                  <div class="txt">{{ item.salePerson }}</div>
                </div>

                <div class="orderItem_data time">
                  <div class="order_label">签约日期</div>
                  <div class="txt">{{ item.bizDate }}</div>
                </div>
              </div>
              <div class="orderItem_footer">
                <div class="carStatus">{{ item.billStatus }}</div>
              </div>
            </div>
          </div>
        </div> -->
      </van-list>
      <van-empty class="noContent" description="暂无数据" v-else />
    </van-pull-refresh>
  </div>
</template>

<script>
import Vue from "vue";
import { Search, DropdownMenu, DropdownItem, Empty, Dialog, List } from "vant";
import taskApi from "@/api/taskApi";
import commonApi from "@/api/commonApi";
import sellManageApi from "@/api/sellManageApi";
import { getCookies } from "@/utils/util.js";

export default {
  name: "repairOrder",
  components: {
    Search,
    DropdownMenu,
    DropdownItem,
    Empty,
    Dialog,
  },
  data() {
    return {
      value: "",
      carCouponList: [
        { name: "是", code: 1, check: false },
        { name: "否", code: 0, check: false },
      ],
      firstStatusList: [
        { name: "已处理", code: 1, check: false },
        { name: "未处理", code: 2, check: false },
      ],
      secondStatusList: [
        { name: "持续跟进", code: 1, check: false },
        { name: "本次战败", code: 2, check: false },
        { name: "邀约成功", code: 3, check: false },
      ],
      taskTypeList: [],
      statusList: [
        { name: "已处理", code: 1, check: false },
        { name: "未处理", code: 2, check: false },
      ],

      recordList: [
        // {
        //   billId: '1', //单据ID
        //   carNo: '闽D66666', //车牌号
        //   taskName: '闽D66666定期保养招揽', //任务名称
        //   taskPerson: '张三', //跟进人
        //   oneBillStatus: '未处理', //任务一级状态
        //   twoBillStatus: '未处理', //任务二级状态
        //   customerName: '李四', //客户名称
        //   mobile1: '', //手机1
        //   mobile12: '', //手机2
        //   serverName: '王武', //所属服务顾问
        //   carModel: 'CT5 2,0T', //车型
        //   carMiles: '8888', //公里数
        //   dateIn: '2023-06-25', //最近进场日期
        // },
      ],
      columns: [],
      showSelectPicker: false,
      requestParams: {
        method: "getSaleContractList", //固定值
        codeNo: "", //车架号，非必填，String
        pageNo: "1", //页码，非必填，String
        userId: "", //用户ID，必填，String
        orgId: "", //登录组织Id，必填，String
        bizStartDate: "", //签约开始时间，非必填，String
        bizEndDate: "", //签约结束时间，非必填，String
        invoiceStartDate: "", //整车开票开始时间，非必填，String
        invoiceEndDate: "", //整车开票结束时间，非必填，String
        receiveStartDate: "", //最后收款开始时间，非必填，String
        receiveEndDate: "", //最后收款结束时间，非必填，String
        salesType: "", //销售类型，非必填，String
        isReceive: "", //是否收全款，非必填，String
        isSaleJP: "", //是否销售精品，非必填，String
        isInvoice: "", //是否开全票，非必填，String
        userId: getCookies("userId"), //用户ID，必填，String
        shCarType: "",
      },
      carCouponIndex: null,

      repairCenterList: [
        { name: "厦门路虎", code: 1 },
        { name: "厦门捷豹", code: 2 },
      ],
      serviceList: [
        { name: "黄某某", code: 1 },
        { name: "张某某", code: 2 },
      ],
      delayList: [
        { name: "是", billId: "1", check: false },
        { name: "否", billId: "0", check: false },
      ],
      creatList: [
        { name: "是", billId: "1", check: false },
        { name: "否", billId: "0", check: false },
      ],
      defeatList: [
        { name: "是", billId: "1", check: false },
        { name: "否", billId: "0", check: false },
      ],

      delayIndex: null,
      creatIndex: null,
      defeatIndex: null,
      timeField: "",
      showPickerDate: false,
      currentDate: new Date(),
      list: [],
      // 分页参数
      loading: false,
      finished: false,
      refreshing: false,
      isLoadData: false,
      field: "",
      fieldName: "",
      fixCenterList: [],
      sellTypeList: "", // 销售类型列表
    };
  },

  mounted() {
    this.getSellTypeList();
    this.initData();
  },

  methods: {
    // 获取销售类型列表
    getSellTypeList() {
      commonApi
        .getEnums({
          key: "saleContractSecondSaleType",
          userId: this.requestParams.userId,
        })
        .then((res) => {
          if (res.data) {
            this.sellTypeList = this.formatCheckData(res.data);
          }
        });
    },
    // 初始化列表
    initData() {
      this.requestParams.pageNo = 1;
      this.loadData();
    },
    // 获取列表
    loadData() {
      if (this.isLoadData) return;
      this.isLoadData = true;
      this.loading = true;
      this.finished = false;
      // console.log(this.isLoadData);
      sellManageApi
        .secondHandCarFacade({ ...this.requestParams })
        .then((res) => {
          if (this.requestParams.pageNo == 1) {
            this.recordList = res.data;
          } else {
            this.recordList = this.recordList.concat(res.data || []);
          }
          this.requestParams.pageNo += 1;

          if (res.data.length < 10) {
            this.finished = true;
            this.isLoadData = true;
          }
          this.isLoadData = false;
          this.loading = false;
        });
    },
    // 下拉刷新
    onRefresh() {
      // 清空列表数据
      this.recordList = [];
      this.finished = false;
      // 重新加载数据
      // 将 loading 设置为 true，表示处于加载状态
      this.loading = true;
      this.refreshing = false;
      this.initData();
    },
    // 获取任务类型
    getTaskType() {
      commonApi
        .getTaskType({ userId: this.requestParams.userId })
        .then((res) => {
          this.taskTypeList = this.formatCheckData(res.data);
        });
    },
    // 获取维修中心
    getMainFixCentel() {
      commonApi
        .getMainFixCentel({ userId: this.requestParams.userId })
        .then((res) => {
          this.fixCenterList = res.data;
        });
    },
    // 获取服务顾问
    getEmpPerson() {
      commonApi
        .getEmpPerson({
          fixCenterId: this.requestParams.fixCenterId,
          userId: this.requestParams.userId,
        })
        .then((res) => {
          this.serviceList = res.data;
        });
    },

    // 格式化多选数据
    formatCheckData(data) {
      data.forEach((item) => {
        item.check = false;
      });
      return data;
    },

    // 选择下拉
    handleSelect(field, fieldName) {
      this.showSelectPicker = true;
      if (field == "carCoupon") {
        this.columns = [
          { name: "是", value: 1 },
          { name: "否", value: 2 },
        ];
      } else if (field == "outUser") {
        this.columns = [
          { name: "服务人员1", value: 1 },
          { name: "服务人员2", value: 2 },
        ];
      } else if (field == "fixCenterId") {
        this.columns = this.fixCenterList;
      }
      this.field = field;
      this.fieldName = fieldName;
    },

    // 筛选是否
    handleCarSelect(index) {
      this.carCouponIndex = index;
    },
    // 筛选重置
    handleSelectReset() {
      this.requestParams.taskPersonId = "";
      this.requestParams.isGenRepBook = "";
    },

    // 选择下拉确认
    handleSelectConfirm(value, index) {
      this.requestParams[this.field] = value.billId;
      this.requestParams[this.fieldName] = value.name;
      if (this.field == "fixCenterId") {
        this.getEmpPerson();
      }
      this.showSelectPicker = false;
    },

    // 所属服务顾问重置
    handleReset() {
      this.requestParams.fixCenterId = "";
      this.requestParams.outUser = "";
    },

    //时间重置
    handleAccidentReset() {
      this.creatIndex = null;
      this.defeatIndex = null;
      this.delayIndex = null;
      this.requestParams.isReceive = "";
      this.requestParams.isSaleJP = "";
      this.requestParams.isInvoice = "";
    },
    onConfirm(ref) {
      this.$refs[ref].toggle();
      if (ref == "salesTypeRef") {
        let checkList = [];
        this.sellTypeList.forEach((el) => {
          if (el.check) {
            checkList.push(el.value);
          }
          this.requestParams.salesType = checkList.join(",");
        });
      }
      if (ref == "filterRef") {
      }
      this.initData();
    },
    // 时间确认
    onConfirmDate() {
      this.requestParams[
        this.timeField
      ] = `${this.value1}-${this.value2}-${this.value3}`; // 字符串拼接 结果入2020-07-03
      this.onCancelDate();
    },
    onCancelDate() {
      this.showPickerDate = false;
    },

    // 日期组件自定义格式
    formatter(type, value) {
      if (type === "year") {
        this.value1 = value; // 可以拿到当前点击的数值
        return `${value}年`;
      } else if (type === "month") {
        this.value2 = value;
        return `${value}月`;
      }
      this.value3 = value;
      return `${value}日`;
    },

    // 获取list名称
    getFieldName(list, key, val) {
      if (list && list.length > 0) {
        let obj = list.filter((item) => {
          return item[key] == val;
        });
        if (obj.length > 0) {
          return obj[0].name;
        }
      }
      return null;
    },

    // 详情
    goDetail(data) {
      this.$router.push({
        path: "/salesManageDetail",
        query: { billId: data.billId },
      });
    },
    // 顶部筛选选择数据
    handleSearchSelect(index, listKey) {
      this[listKey][index].check = !this[listKey][index].check;
    },
    // 重置
    handleSearchReset() {
      this.firstStatusList.forEach((item) => {
        item.check = false;
      });
      this.secondStatusList.forEach((item) => {
        item.check = false;
      });
      this.sellTypeList.forEach((item) => {
        item.check = false;
      });
    },

    // 是否数据选择
    handleIsSelect(index, key, list, field) {
      this[key] = index;
      this.requestParams[field] = this[list][index].billId;
    },

    // 时间筛选
    handleSelectTime(field) {
      this.timeField = field;
      this.showPickerDate = true;
    },
    clearSearch() {
      this.requestParams.codeNo = "";
      this.initData();
    },
  },
};
</script>

<style lang="less" scoped="">
body {
  background: #f3f3f3;
}
.search_content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
}
.timebox {
  /deep/.van-cell::after {
    border: none;
  }
  .time_item {
    /deep/.van-field__control--right {
      border: 1px solid #d1d1d1;
      padding: 0.1rem 0;
      text-align: center;
      border-radius: 3px;
    }
  }
}
.searchbox {
  padding: 0.3rem;
  .title {
    font-size: 0.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.2rem;
    padding-top: 0.2rem;
  }
  .insureList {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    .insure_item {
      border: 1px solid #999;
      text-align: center;
      padding: 0.15rem 0rem;
      width: 30%;
      box-sizing: border-box;
      // margin-right: 0.1rem;
      font-size: 0.26rem;
      border-radius: 3px;
      color: #666;
      margin-bottom: 0.2rem;
      margin-right: 5%;
      &:nth-child(3n) {
        margin-right: 0;
      }
      &.active {
        border: 1px solid #f65e07;
        color: #f65e07;
      }
    }
  }
  .insureBtn {
    display: flex;
    justify-content: right;
    margin-top: 0.4rem;
    .resetBtn {
      padding: 0 0.4rem;
      margin-right: 0.2rem;
    }
    .confirmBtn {
      padding: 0 0.4rem;
    }
  }
}

.orderList {
  padding-top: 148px;
  margin: 0.2rem;
  overflow: hidden;
  // padding-bottom: 1.5rem;
  .taskCheck {
    margin-right: 0.1rem;
  }
  .orderItem {
    padding: 0.3rem;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 0.3rem;
    width: 100%;
    .orderItem_header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.3rem;
      padding-bottom: 0.2rem;
      border-bottom: 1px solid #f6f6f6;
      position: relative;
      .orderItem_lt {
        .carNo {
          font-size: 0.3rem;
          color: #333;
          margin-right: 0.2rem;
          font-weight: bold;
        }

        .carStatus {
          background: #35bc04;
          color: #fff;
          border-radius: 4px;
          padding: 0.1rem 0.2rem;
          font-size: 0.24rem;
          text-align: center;
          width: 1rem;
          margin-top: 0.1rem;
        }
      }
      .orderItem_rt {
        display: flex;
        align-items: center;
        align-self: center;
        justify-content: flex-start;
        color: #666;
        font-size: 0.28rem;

        .txt {
          font-size: 0.28rem;
          color: #161616;
        }
        .icon-tel {
          color: #fff;
          background: #35bc04;
          font-size: 0.32rem;
          padding: 0.1rem;
          border-radius: 50%;
          margin-right: 0.2rem;
        }
        .icon-wx {
          color: #409eff;
          font-size: 0.65rem;
        }
      }
    }
    .orderItem_content {
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;
      align-items: center;
      .orderItem_data {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 50%;
        margin-bottom: 0.2rem;
        font-size: 0.28rem;
        box-sizing: content-box;
        color: #333;
        .order_label {
          font-size: 0.28rem;
          color: #333;
          width: 1.8rem;
        }
        .txt {
          font-size: 0.28rem;
          color: #666;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        &.time {
          width: 100%;
        }
      }
    }
    .orderItem_footer {
      display: flex;
      justify-content: flex-end;
      .carStatus {
        background: #35bc04;
        color: #fff;
        border-radius: 4px;
        padding: 0.1rem 0.2rem;
        font-size: 0.24rem;
        text-align: center;
        width: 1rem;
        margin-top: 0.1rem;
      }
    }
    .orderItem_file {
      background: #ebebeb;
      color: #333;
      border-radius: 5px;
      padding: 0.2rem 0;
      text-align: center;
      width: 100%;
      font-size: 0.28rem;
      display: flex;
      align-items: center;
      justify-content: center;
      .file_item {
        width: 33.33%;
        border-right: 1px solid #ccc;
        .icon-tel {
          font-size: 0.34rem;
          color: #35bc04;
          margin-right: 0.1rem;
        }
        .icon-mileage {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        .icon-gw {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        &:last-child {
          border: none;
        }
      }
    }
  }
}
.addBtn {
  position: fixed;
  bottom: 0.8rem;
  width: 100%;
  z-index: 1;
  .footerBtn {
    width: 2.8rem;
    margin: auto;
    text-align: center;
    font-size: 0.28rem;
    padding: 0.25rem 0rem;
    border-radius: 50px;
  }
  .orderItem_filebox {
    margin: auto;
    background: #409eff;
    color: #fff;
  }
  .comfirmBtn {
    background: #409eff;
    color: #fff;
  }
  .cancelBtn {
    border: 1px solid #ccc;
    color: #999;
    background: #fff;
  }
}
.noContent {
  margin-top: 2rem;
}
.carList {
  padding-top: 148px;
  margin: 0.2rem;
  overflow: hidden;
  .carItem {
    padding: 0.3rem;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 0.3rem;
    .carItem_name {
      margin-bottom: 0.3rem;
      padding-bottom: 0.2rem;
      border-bottom: 1px solid #f6f6f6;
      position: relative;
      font-size: 0.28rem;
      font-weight: bold;
      line-height: 0.3rem;
    }
    .carItem_con {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      align-content: center;
      align-self: center;
      .carItem_con_lt {
        width: 1.6rem;
        height: 1.6rem;
        margin-right: 0.2rem;
        img {
          width: 100%;
          height: 100%;
          display: block;
          border-radius: 5px;
        }
        .noimg {
          text-align: center;
          width: 1.6rem;
          height: 1.6rem;
          line-height: 1.6rem;
          border-radius: 5px;
          // border: 1px solid #ccc;
          color: #999;
          font-size: 0.26rem;
          background: #f4f4f4;
        }
      }
      .carItem_con_rt {
        .carItem_data {
          display: flex;
          align-items: center;
          font-size: 0.26rem;
          margin-bottom: 0.1rem;
          &:last-child {
            margin-bottom: 0;
          }
          .carItem_data_txt {
            border-right: 1px solid #999;
            color: #333;
            padding-right: 0.1rem;
            margin-right: 0.1rem;
            &:last-child {
              border-right: none;
            }
          }
          .carItem_label {
            color: #333;
          }
          .carItem_txt {
            color: #333;
          }
        }
      }
    }
    .carItem_footer {
      display: flex;
      justify-content: flex-end;
      border-top: 1px solid #f6f6f6;
      margin-top: 0.1rem;
      padding-top: 0.2rem;
      align-items: center;
      .acount {
        font-size: 0.26rem;
        color: #333;
        .txt {
          color: #e31f1f;
        }
        .txt1 {
          color: #666;
        }
      }
      .carStatus {
        background: #35bc04;
        color: #fff;
        border-radius: 3px;
        padding: 0.1rem 0.15rem;
        font-size: 0.24rem;
        margin-right: 10px;
        display: inline-block;
        &:last-child {
          margin-right: 0;
        }
      }
    }
  }
}
</style>
